<?php

namespace app\admin\validate;

use think\Validate;

class Model extends Validate
{
    
	protected $rule = [
        'model_name'    =>   'require|unique:models',
        'table_name'    =>   'require|alpha|unique:models',
    ];
    protected $message = [
        'model_name.require'   =>'模型名称不能为空',
        'model_name.unique'   =>'模型名称不能重复',
        'table_name.require'   =>'附加表名不能为空',
        'table_name.unique'   =>'附加表名不能重复',
        'table_name.alpha'   =>'附加表名必须为纯字母',
    ];
    protected $scene=[
		'save'=>['model_name','table_name' ],
		'edit'=>['model_name','table_name' ],
	];
}
